package com.dubbo.learn.spi;

import com.alibaba.dubbo.common.extension.ExtensionLoader;

/**
 * 演示 Dubbo SPI 的使用方法
 *
 * @author: huhaichao
 * @date: 2019/1/29
 */
public class DubboSPITest {
    public static void main(String[] args) {
        ExtensionLoader<Robot> extensionLoader = ExtensionLoader.getExtensionLoader(Robot.class);
        Robot bumblebee = extensionLoader.getExtension("bumblebee");
        Robot optimusPrime = extensionLoader.getExtension("optimusPrime");
        bumblebee.sayHello();
        optimusPrime.sayHello();
    }
}
